package com.whfc.ms.api.mach.service.impl;

import com.whfc.common.result.ListData;
import com.whfc.common.result.PageData;
import com.whfc.mach.dto.MachDictDataDTO;
import com.whfc.mach.param.MachDictDataAddParam;
import com.whfc.mach.param.MachDictDataEditParam;
import com.whfc.mach.service.AppMachDictDataService;
import com.whfc.ms.api.mach.service.MsMachDictDataService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

/**
 * @author sun_guodong
 * @date 2021-08-09
 */
@Service
public class MsMachDictDataServiceImpl implements MsMachDictDataService {

    @DubboReference(interfaceClass = AppMachDictDataService.class, version = "1.0.0")
    private AppMachDictDataService appMachDictDataService;

    @Override
    public PageData<MachDictDataDTO> list(Integer deptId, String dictCode, Integer pageNum, Integer pageSize) {
        return appMachDictDataService.list(deptId, dictCode, pageNum, pageSize);
    }

    @Override
    public ListData<MachDictDataDTO> list(Integer deptId, String dictCode) {
        return appMachDictDataService.list(deptId, dictCode);
    }

    @Override
    public void add(MachDictDataAddParam param) {
        appMachDictDataService.add(param);
    }

    @Override
    public void edit(MachDictDataEditParam param) {
        appMachDictDataService.edit(param);
    }

    @Override
    public void del(Integer id) {
        appMachDictDataService.del(id);
    }
}
